﻿
Partial Class WebForm_ManageEmployee
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            Me.BindDDLActive()
        End If
    End Sub

    Protected Sub AddEmployee1_Saved(ByVal sender As Object, ByVal e As System.EventArgs) Handles AddEmployee1.Saved
        Me.AddData()
        Me.TabContainer1.ActiveTab = Me.SearchTabPanel
    End Sub

    Protected Sub SearchEmployee1_Editing(ByVal source As Object, ByVal e As System.EventArgs) Handles SearchEmployee1.Editing

        Me.TabContainer1.ActiveTab = Me.AddTabPanel
        Me.AddEmployee1.ShowEdit(Me.SearchEmployee1.EmployeeID)
    End Sub

    Protected Sub SearchEmployee1_Loaded(ByVal sender As Object, ByVal e As System.EventArgs) Handles SearchEmployee1.Loaded
        Me.SearchEmployee1.BindGV()
    End Sub

    Protected Sub lknAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lknAdd.Click
        Me.AddEmployee1.Show()
        Me.TabContainer1.ActiveTab = Me.AddTabPanel
    End Sub
End Class

Partial Class WebForm_ManageEmployee
    Private Function AddData() As Boolean
        'Me.BindOrganization()

    End Function

    Private Function UpdateData() As Boolean
        'Me.BindOrganization()
    End Function

    Private Sub BindDDLActive()
        Me.ddlActive.DataTextField = "Text"
        Me.ddlActive.DataValueField = "Value"
        Me.ddlActive.DataSource = MyObj.GetCodeMappingData("Organization", "Active")
        Me.ddlActive.DataBind()

        Me.ddlActive.Items.Insert(0, "全部")
        Me.ddlActive.SelectedIndex = Me.ddlActive.Items.IndexOf(Me.ddlActive.Items.FindByValue("Y"))
    End Sub

End Class